<?php
class Subject extends MY_Controller{

	/**
	 * 获取科目listlist
	 * 
	 * @return [type] [description]
	 */
	function get_subject_list(){
		$data = $this->user_post_data;
		$data = $this->user_post_data;
    	if(!empty($data)){
    		$this->load->model('Subject_model');
    		$list = $this->Subject_model->subject_list();

    		$data_obj = array(
                'count' => count($list),
                'list' => $list,
             );

    		echo json_encode(array("code" => 1, "data" => $data_obj));
    	}else{
            echo json_encode(array("code" => 404, "data" => 'not user'));
        }
	}
}